import 'package:flutter/material.dart';
import 'package:mobile_app.home.core/core/presentation/theme/home_core_theme.dart';

class RoundedCard extends StatelessWidget {
  const RoundedCard({
    required this.child,
    required this.radius,
    this.shadows,
    super.key,
  });

  final Widget child;
  final double radius;
  final List<BoxShadow>? shadows;

  @override
  Widget build(BuildContext context) {
    return Container(
      decoration: BoxDecoration(
        color: HomeCoreTheme.of(context).cardColor,
        borderRadius: BorderRadius.circular(radius),
        boxShadow: shadows,
      ),
      child: ClipRRect(
        borderRadius: BorderRadius.circular(radius),
        child: child,
      ),
    );
  }
}
